#ifndef APP_STATE_MANAGER_HPP
#define APP_STATE_MANAGER_HPP

class AppStateManager : public AppStateListener
{
public:
	typedef struct
	{
		Ogre::String szName;
		AppState*	 pState;
	} tStateInfo;

			AppStateManager();
			~AppStateManager();

	virtual void	ManageAppState(Ogre::String stateName, AppState* state);	
	virtual void	ChangeAppState(AppState* state);
	virtual bool	PushAppState(AppState* state);
	virtual void	PopAppState();
	virtual void	PauseAppState();
	virtual void	Shutdown();
	virtual void	PopAllAndPushAppState(AppState* state);
	virtual AppState* FindByName(Ogre::String stateName);

		void	Start(AppState* state);
protected:
		void	Init(AppState *state);
		
		std::vector<AppState*>		m_ActiveStateStack;
		std::vector<tStateInfo>		m_States;
		bool						m_bShutdown;
};

#endif

